package net.tarine.gastronomi.client.services;

import java.util.List;

import net.tarine.gastronomi.shared.to.ForumMessageTo;
import net.tarine.gastronomi.shared.to.ForumThreadTo;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface ForumServiceAsync {
	//thread
	void findForumThreads(String gasId, Integer offset, Integer pageSize, AsyncCallback<List<ForumThreadTo>> callback);
	void findForumThreadById(String id, AsyncCallback<ForumThreadTo> callback);
	void createForumThread(String gasId, AsyncCallback<ForumThreadTo> callback);
	void deleteForumThread(String id, AsyncCallback<Boolean> callback);
	
	//message
	void addForumThreadMessage(ForumThreadTo thread, ForumMessageTo message, AsyncCallback<ForumThreadTo> callback);
	void findForumMessageById(String id, AsyncCallback<ForumMessageTo> callback);
	void createForumMessage(AsyncCallback<ForumMessageTo> callback);
	void deleteForumMessage(String id, AsyncCallback<Boolean> callback);
	
	//subscriptions
	void subscribeThread(String threadId, String gasUserId, boolean subscribed,	AsyncCallback<Boolean> callback);
	void findThreadSubscriberIds(String threadId, AsyncCallback<List<String>> callback);
}
